﻿package mortal.game.view.platform
{
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;

    public class PlatformDownLoadIcon extends ActionBaseIcon
    {
        private static var _instance:PlatformDownLoadIcon;

        public function PlatformDownLoadIcon(param1:String)
        {
            super(param1);
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            disEventName = EventName.PlatformDownLoadShow;
            this.name = "PlatformDownLoadIcon";
            return;
        }// end function

        override public function playEffect(param1:String = "ActionIconEffect.swf") : void
        {
            super.playEffect(param1);
            return;
        }// end function

        override public function get width() : Number
        {
            return 56;
        }// end function

        override public function get height() : Number
        {
            return 54;
        }// end function

        public function showIconByBtnName(param1:String) : void
        {
            btn.styleName = param1;
            btn.drawNow();
            show();
            return;
        }// end function

        public static function get instance() : PlatformDownLoadIcon
        {
            if (!_instance)
            {
                _instance = new PlatformDownLoadIcon(ResFileConst.YYZiZuanIcon);
            }
            return _instance;
        }// end function

        public static function hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

        public static function isViewShow() : Boolean
        {
            return hasInstance() && !instance.isHide;
        }// end function

    }
}
